/**
 * 
 */
package ro.dta.idbi.interfaces;

import java.io.FileNotFoundException;
import java.io.IOException;

import com.mxgraph.io.mxCodec;
import com.mxgraph.swing.mxGraphComponent;

/**
 * Interface for the save graph strategy
 * 
 * @author Tudor Dobrila
 * 
 */
public interface ISaveStrategy {

	/**
	 * @return Extension of the file
	 */
	String getExtension();

	/**
	 * 
	 * @return File filter associated with the strategy
	 */
	javax.swing.filechooser.FileFilter getFileFilter();

	/**
	 * Save a graph to a file
	 * 
	 * @param graphComponent
	 *            Graph component holding the graph to be saved
	 * @param codec
	 *            Codec of the current metamodel, used to represent the
	 *            constructs in the model
	 * @param path
	 *            Path where to save the file
	 * @throws IOException
	 *             If an error occured while saving the diagram
	 * @throws FileNotFoundException
	 *             If an error occured while saving the diagram
	 */
	void save(mxGraphComponent graphComponent, mxCodec codec, String path)
			throws FileNotFoundException, IOException;

}
